A data center generally has a cluster of computers, and each computer has some storage, such as hard disks, attached to it. Objects such as a file, a collection of files, or other types of data may be stored on the computer's storage. Replicas or copies of the objects are also desirably stored on one or more machines in the cluster. It is desirable to have multiple replicas of the object so in case one replica storage gets corrupted or destroyed or if an associated machine becomes unavailable, another replica can still be accessed. For example, two replicas may be stored, referred to as a primary replica and a secondary replica. The two replicas of a given object are said to be peers of each other.
A problem is determining where to store the primary and secondary replica of each object among the computers in the cluster in such a way that certain constraints are not violated. For example, it might be desirable that every object has at least one of its replicas available whenever some class of common failures occurs.
It is desirable to assign storage locations to object replicas such that high availability and fast recovery may be achieved. Conventional methods of solving the replica-assignment problem rely on trial and error.